package com.myclasses;

public class UserBean {
	private String name;
	private String group;
	private String indexNo;
	private String email;

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;/*
		if (this.name!=null && this.group!=null && this.email!=null && this.indexNo!=null){
			System.out.println("name");
		}

		System.out.println("========NAME==========================");
		System.out.println("Name: "+ name );
		System.out.println("Group: "+ group );
		System.out.println("Index: "+ indexNo );
		System.out.println("Email: "+ email );
		System.out.println("==================================");*/
	}

	public String getGroup() {
		return this.group;
	}

	public void setGroup(String group) {
		this.group = group;/*
		if (this.name!=null && this.group!=null && this.email!=null && this.indexNo!=null){
			System.out.println("group");
		}

		System.out.println("========GROUP==========================");
		System.out.println("Name: "+ name );
		System.out.println("Group: "+ group );
		System.out.println("Index: "+ indexNo );
		System.out.println("Email: "+ email );
		System.out.println("==================================");*/
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;/*
		if (this.name!=null && this.group!=null && this.email!=null && this.indexNo!=null){
			System.out.println("email");
		}
		System.out.println("========EMAIL==========================");
		System.out.println("Name: "+ name );
		System.out.println("Group: "+ group );
		System.out.println("Index: "+ indexNo );
		System.out.println("Email: "+ email );
		System.out.println("==================================");*/
		
		if (this.name!=null && this.group!=null && this.email!=null && this.indexNo!=null){
			Contacts contact = Contacts.getInstance();
			//insertContact(String name, String email, String indexNo, String group){
			contact.insertContact(name, email, indexNo, group);
		}
	}

	public String getIndexNo() {
		return this.indexNo;
	}

	public void setIndexNo(String indexNo) {
		this.indexNo = indexNo;
		if (this.name!=null && this.group!=null && this.email!=null && this.indexNo!=null){
			System.out.println("index");
		}
	}
}
